package com.hdit.guimei.web;

import com.hdit.guimei.domain.Payment;
import com.hdit.guimei.service.impl.PaymentServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServlet;

/**
 * @author 张宝玉
 * @date 2021/1/21 15:03
 */
@Controller
public class PaymentController extends HttpServlet {
    @Autowired
    public PaymentServiceImpl paymentService;

    @RequestMapping("/addpayment")
    public String addpayment(@RequestBody Payment payment){
        int i = paymentService.addpeyment(payment);
        if (i==1){
            return "";
        }else{
            return "";
        }
    }
    @RequestMapping("delepayment")
    public String delepayment(int payment_id){
        int i = paymentService.delepayment(payment_id);
        if (i==1){
            return "";
        }else{
            return  "";
        }
    }

}
